package com.vimi8.ebb.api.datareport;

import com.vimi8.ebb.configuration.HttpResponseEntity;
import com.vimi8.ebb.dto.EbbDataReportCollectivityDto;
import com.vimi8.ebb.dto.TradeSituationDto;
import com.vimi8.ebb.model.DataReport;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by think on 2017/4/10.
 */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringCodegen",  date = "2017-04-10T14:30:07.581Z")
@RestController
@Api(value = "/data/report", description = "the dataReportCollectivity API")
public interface DataReportCollectivityApi {
    @ApiOperation(value = "查询电商总体分析报告", notes = "查询电商总体分析报告." +
        "ebbPlatformTotal—电商平台总数；" +
        "ThirdPartyPlatform—第三方平台数量；" +
        "comServicePlatform—电商综合服务平台数量；" +
        "SelfBuiltPlatform—自建平台数量；" +
        "logisticsNetworkNode—物流网点；" +
        "logisticsMonthIn—发入量；" +
        "logisticsMonthOut—发出量；" +
        "trainBatch—培训批次；" +
        "trainPeopleNum—培训人数；" +
        "productNum—电商平台销售的产品；", response = EbbDataReportCollectivityDto.class,
        tags = {"数据报告",})
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回数据报告列表", response = EbbDataReportCollectivityDto.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class)})
    @RequestMapping(value = "/collectivity/all",
            method = RequestMethod.GET)
    HttpResponseEntity<EbbDataReportCollectivityDto> getDataReports(
            @ApiParam(value = "year（年—参数为纯数字，如：2017）",required = true) @RequestParam(value="year",required = true)int year,
            @ApiParam(value = "quarter（季度—参数为数字，如：3）",required = true) @RequestParam(value="quarter",required = true)int quarter
    );

    @ApiOperation(value = "电商平台类型及每个类型的交易情况", notes = "电商平台类型及每个类型的交易情况.tradingVolume—交易额；" +
            "businessVolume—交易量；" +
            "platform—平台", response = TradeSituationDto.class,
            tags = {"数据报告",})
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回数据报告列表", response = TradeSituationDto.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class)})
    @RequestMapping(value = "/collectivity/ebbAnalysisByType",
            method = RequestMethod.GET)
    HttpResponseEntity<List<TradeSituationDto>> getAnalysisDataReportsByType(
            @ApiParam(value = "year（年—参数为纯数字，如：2017）",required = true) @RequestParam(value="year",required = true)int year,
            @ApiParam(value = "quarter（季度—参数为数字，如：3）",required = true) @RequestParam(value="quarter",required = true)int quarter
    );

    @ApiOperation(value = "电商平每一季度及其中每月的交易情况", notes = "电商平每一季度及其中每月的交易情况.tradingVolume—交易额；" +
            "businessVolume—交易量；", response = TradeSituationDto.class,
            tags = {"数据报告",})
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回数据报告列表", response = TradeSituationDto.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class)})
    @RequestMapping(value = "/collectivity/ebbMonthAndQuarterDataAnalysis",
            method = RequestMethod.GET)
    HttpResponseEntity<List<TradeSituationDto>> getMonthAndQuarterDataAnalysisReports(
            @ApiParam(value = "year（年—参数为纯数字，如：2017）",required = true) @RequestParam(value="year",required = true)int year,
            @ApiParam(value = "quarter（季度—参数为数字，如：3）",required = true) @RequestParam(value="quarter",required = true)int quarter
    );

}
